<template>
  <el-button type="primary" @click="handleClick">主要按钮</el-button><br><br>
  <el-row v-if="show">
    <el-button type="success">成功按钮</el-button>
    <el-button type="info" plain>信息按钮</el-button>
    <el-button type="warning" round>警告按钮</el-button>
    <el-button type="danger" round>危险按钮</el-button>
    <el-button type="primary" plain disabled>主要按钮,禁用</el-button>
    <el-button type="primary" :loading="true">加载中</el-button>
  </el-row>
  <br><br>
  <el-row v-if="show">
    <el-button-group>
      <el-button type="primary" icon="el-icon-arrow-left">上一页</el-button>
      <el-button type="primary">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>
    </el-button-group>
    <el-button-group>
      <el-button type="primary" icon="el-icon-edit"></el-button>
      <el-button type="primary" icon="el-icon-share"></el-button>
      <el-button type="primary" icon="el-icon-delete"></el-button>
    </el-button-group>
    <el-button type="primary" icon="el-icon-search">搜索</el-button>
    <el-button type="primary">上传<i class="el-icon-upload el-icon--right"></i></el-button>
  </el-row>
</template>

<script>
import { reactive, toRefs } from 'vue'

export default {
  setup () {
    const state = reactive({
      show: true
    })
    const handleClick = () => {
      state.show = !state.show
    }
    return {
      ...toRefs(state),
      handleClick
    }
  }
}
</script>
